<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<jsp:include page="../common/common.jsp"/>
<script type="text/javascript" src="/static/js/system/employee.js"></script>
<style>
    .widthCombo {
        width:158px!important;

    }
</style>
<script>
    $(function () {
        $(".textbox-prompt").css("width", "205px");
        $(".passwordbox-open").css("width","30px");
        var frame = $("select").next("span");
        frame.addClass("widthCombo")
        $("#_easyui_textbox_input11").addClass("widthCombo")
    })
</script>
<head>
    <title>员工列表</title>
</head>
<body>
<table id="emp_list"></table>

<div id="emp_toolbar">
    <shiro:hasPermission name="employee:saveOrUpdate">
        <a class="easyui-linkbutton" href="#" iconCls="icon-add" plain="true" data-cmd="add">新增</a>
        <a class="easyui-linkbutton" href="#" iconCls="icon-edit" plain="true" data-cmd="edit">编辑</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="employee:changeState">
        <a id="btn_state" class="easyui-linkbutton" href="#" iconCls="icon-cancel" plain="true"
           data-cmd="changeState">状态</a>
    </shiro:hasPermission>
    <a class="easyui-linkbutton" href="#" iconCls="icon-reload" plain="true" data-cmd="reload">刷新</a>


    <input id="keyword" type="text" class="easyui-textbox" name="keyword" prompt="关键字"/>
    部门:<input id="deptId" type="text" class="easyui-combobox" name="deptId" panelHeight="auto" prompt="请选择"
              data-options="valueField:'id',textField:'name',url:'/dept/listAll.do'">
    <%--如何限制两个入职时间的大小--%>
    入职时间:<input id="minTime" type="text" class="easyui-datebox" name="minTime"> -
    <input id="maxTime" type="text" class="easyui-datebox" name="maxTime">
    <a class="easyui-linkbutton" href="#" iconCls="icon-search" plain="true" data-cmd="query">查询</a>

    <shiro:lacksRole name="员工">
        <a class="easyui-linkbutton" href="#" iconCls="icon-redo" plain="true" data-cmd="exportEmp">导出</a>
        <a class="easyui-linkbutton" href="#" iconCls="icon-undo" plain="true" data-cmd="importEmp">导入</a>
    </shiro:lacksRole>
</div>

<div id="emp_import">
    <form id="emp_importForm" enctype="multipart/form-data" method="post"
          style="margin-top: 20px;margin-left: 20px">
        <input class="easyui-filebox" name="file" style="width: 240px" type="text"/>
    </form>
</div>
<div id="import_button">
    <a class="easyui-linkbutton" href="#" iconCls="icon-redo" plain="true" data-cmd="exportTemplate">下载模板</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-ok" plain="true" data-cmd="upload">保存</a>
</div>


<div id="emp_dialog">
    <form id="emp_form" method="post" style="margin-top: 20px">
        <table style="margin: 0 auto">
            <input type="hidden" name="id">
            <tr>
                <td><input label="用户名" type="text" class="easyui-textbox" name="username"
                           style="width: 250px;" labelWidth="90px"></td>
            </tr>
            <tr>
                <td><input label="真实姓名" type="text" class="easyui-textbox" name="realname"
                           style="width: 250px;" labelWidth="90px"></td>
            </tr>
            <tr id="emp_password">
                <td><input label="密码" type="text" class="easyui-passwordbox" name="password"
                           style="width: 250px;" labelWidth="90px"></td>
            </tr>
            <tr>
                <td><input label="联系电话" type="text" class="easyui-textbox" name="tel"
                           style="width: 250px;" labelWidth="90px"></td>
            </tr>
            <tr>
                <td><input label="电子邮件" type="text" class="easyui-textbox" name="email"
                           style="width: 250px;" labelWidth="90px"></td>
            </tr>
            <tr>
                <td><input label="部门" type="text" class="easyui-combobox" name="dept.id" panelHeight="auto"
                           data-options="valueField:'id',textField:'name',url:'/dept/listAll.do'"
                           style="width: 250px;" labelWidth="90px"></td>
            </tr>
            <tr>
                <td><input label="入职时间" type="text" class="easyui-datebox" name="inputTime"
                           style="width: 250px;" labelWidth="90px" panelHeight="230px"></td>
            </tr>
            <tr>
                <td><input label="角色信息" id="emp_roles" type="text" class="easyui-combobox" multiple="true"
                           style="width: 250px;" labelWidth="90px"
                           data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'/role/listAll.do'">
                </td>
            </tr>
            <tr>
                <td><select label="是否管理员" id="emp_admin" class="easyui-combobox" panelHeight="auto" style="width: 145px"
                            name="admin" style="width: 250px;" labelWidth="90px">
                    <option value="1">是</option>
                    <option value="0">否</option>
                </select></td>
            </tr>
        </table>
    </form>

    <div id="emp_diaButtons">
        <a href="#" class="easyui-linkbutton" iconCls="icon-save" data-cmd="save">提交</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" data-cmd="cancel">关闭</a>
    </div>
</div>
</body>
</html>
